﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Data;
using System.IO;
using System.Xml;
using Common;

namespace SDK {
    public class Funcs {
        /// <summary>
        /// Gets the path of the application, for use in retriving the local XML file.
        /// </summary>
        /// <returns>The directory path where the application is running.</returns>


        public static string GetTempFileName() {
            return TempDirectoryPath + DateTime.Now.Ticks + ".tmp";
        }
        public static string GetNewLogFileName() {
            string fn = String.Format(LogsDirectoryPath + "{0}-{1}-{2}-{3}-{4}-{5}.log", new object[] {DateTime.Now.Year, 
                                                                                                       DateTime.Now.Month, 
                                                                                                       DateTime.Now.Day,
                                                                                                       DateTime.Now.Hour, 
                                                                                                       DateTime.Now.Minute, 
                                                                                                       DateTime.Now.Second});
            return fn;
        }

        public static string TempDirectoryPath {
            get { return Common.Funcs.GetAppPath() + "Temp\\"; }
        }
        public static string LogsDirectoryPath {
            get { return Common.Funcs.GetAppPath() + "Logs\\"; }
        }
    }
}
